
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>login · 合同管理</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="Gj">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-prism/prism-tomorrow.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../../styles/website.css">
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="myfiles.html" />
    
    
    <link rel="prev" href="layout.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    概要
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../Framework.html">
            
                <a href="../../Framework.html">
            
                    
                    架构
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">src目录</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="../api.html">
            
                <a href="../api.html">
            
                    
                    api
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="../assets.html">
            
                <a href="../assets.html">
            
                    
                    assets
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="../components.html">
            
                <a href="../components.html">
            
                    
                    components
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="../filters.html">
            
                <a href="../filters.html">
            
                    
                    filters
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="../mixins.html">
            
                <a href="../mixins.html">
            
                    
                    mixins
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="../router.html">
            
                <a href="../router.html">
            
                    
                    router
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="../store.html">
            
                <a href="../store.html">
            
                    
                    store
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="../styles.html">
            
                <a href="../styles.html">
            
                    
                    styles
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.9" data-path="../utils.html">
            
                <a href="../utils.html">
            
                    
                    utils
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10" data-path="./">
            
                <a href="./">
            
                    
                    views
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.10.1" data-path="activate.html">
            
                <a href="activate.html">
            
                    
                    activate
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.2" data-path="approvemanage.html">
            
                <a href="approvemanage.html">
            
                    
                    approvemanage
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.3" data-path="sealmanage.html">
            
                <a href="sealmanage.html">
            
                    
                    sealmanage
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.4" data-path="deptmanage.html">
            
                <a href="deptmanage.html">
            
                    
                    deptmanage
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.5" data-path="faildoc.html">
            
                <a href="faildoc.html">
            
                    
                    faildoc
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.6" data-path="files.html">
            
                <a href="files.html">
            
                    
                    files
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.7" data-path="init.html">
            
                <a href="init.html">
            
                    
                    init
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.8" data-path="layout.html">
            
                <a href="layout.html">
            
                    
                    layout
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="2.10.9" data-path="login.html">
            
                <a href="login.html">
            
                    
                    login
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.10" data-path="myfiles.html">
            
                <a href="myfiles.html">
            
                    
                    myfiles
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.11" data-path="passmail.html">
            
                <a href="passmail.html">
            
                    
                    passmail
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.12" data-path="redirect.html">
            
                <a href="redirect.html">
            
                    
                    redirect
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.13" data-path="sysmanage.html">
            
                <a href="sysmanage.html">
            
                    
                    sysmanage
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.14" data-path="template.html">
            
                <a href="template.html">
            
                    
                    template
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.15" data-path="updateinfo.html">
            
                <a href="updateinfo.html">
            
                    
                    updateinfo
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.16" data-path="usermanage.html">
            
                <a href="usermanage.html">
            
                    
                    usermanage
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.11" data-path="../config.html">
            
                <a href="../config.html">
            
                    
                    配置文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.12" data-path="../newPage.html">
            
                <a href="../newPage.html">
            
                    
                    新建页面
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >login</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h3 id="&#x767B;&#x5F55;&#x9996;&#x9875;">&#x767B;&#x5F55;&#x9996;&#x9875;</h3>
<blockquote>
<p>&#x8BE5;&#x5305;&#x4E0B;&#x5171;&#x56DB;&#x4E2A;&#x6587;&#x4EF6;&#xFF0C;index.js&#x3001;forget&#x3001;thirdParty&#x3001;office.js</p>
</blockquote>
<p><img src="../../images/login.jpg" alt=""></p>
<h5 id="indexjs">index.js</h5>
<p>&#x767B;&#x5F55;&#x754C;&#x9762;</p>
<pre class="language-"><code class="lang-javascript"><span class="token operator">&lt;</span>script<span class="token operator">&gt;</span>
<span class="token keyword">import</span> forget <span class="token keyword">from</span> <span class="token string">&apos;./forget&apos;</span><span class="token punctuation">;</span> <span class="token comment">//&#x5BC6;&#x7801;&#x627E;&#x56DE;&#x6A21;&#x6001;</span>
<span class="token keyword">import</span> officeExtend <span class="token keyword">from</span> <span class="token string">&apos;./office&apos;</span><span class="token punctuation">;</span> <span class="token comment">//office&#x767B;&#x5F55;js</span>
<span class="token keyword">import</span> <span class="token punctuation">{</span> LangSelect <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&apos;@/components&apos;</span><span class="token punctuation">;</span> <span class="token comment">//&#x591A;&#x8BED;&#x8A00;&#x9009;&#x62E9;&#x5668;&#xFF0C;&#x76EE;&#x524D;&#x662F;&#x5C4F;&#x853D;&#x72B6;&#x6001;</span>
<span class="token keyword">import</span> <span class="token punctuation">{</span> LocalStorageEnum <span class="token keyword">as</span> LSEnum <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&apos;@/utils/Enum/VEnum&apos;</span><span class="token punctuation">;</span><span class="token comment">//&#x679A;&#x4E3E;</span>

<span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span>
    name<span class="token operator">:</span> <span class="token string">&apos;Login&apos;</span><span class="token punctuation">,</span>
    components<span class="token operator">:</span> <span class="token punctuation">{</span> forget<span class="token punctuation">,</span> LangSelect <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token keyword">extends</span><span class="token operator">:</span> officeExtend<span class="token punctuation">,</span> <span class="token comment">//&#x4E09;&#x65B9;&#x767B;&#x5F55;&#x51FD;&#x6570;&#x7EE7;&#x627F;</span>
    <span class="token function">data</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">return</span> <span class="token punctuation">{</span>
            loginForm<span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token comment">//&#x767B;&#x5F55;&#x53C2;&#x6570;</span>
            passwordType<span class="token operator">:</span> <span class="token string">&apos;password&apos;</span><span class="token punctuation">,</span> <span class="token comment">//&#x5BC6;&#x7801;&#x8F93;&#x5165;&#x6846; &#x5C55;&#x793A;&#x3001;&#x9690;&#x85CF;</span>
            loading<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>    <span class="token comment">//loading</span>
            redirect<span class="token operator">:</span> <span class="token keyword">undefined</span><span class="token punctuation">,</span> <span class="token comment">//watch &#x76D1;&#x542C; $router &#x8D4B;&#x503C;&#x91CD;&#x5B9A;&#x5411;&#x9875;&#x9762;</span>
            style<span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span><span class="token punctuation">,</span>  <span class="token comment">// &#x6839;&#x636E;&#x4E3B;&#x9898;&#x6539;&#x53D8;</span>
            fontStyle<span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token comment">// &#x6839;&#x636E;&#x4E3B;&#x9898;&#x6539;&#x53D8;</span>
            guideImg<span class="token operator">:</span> <span class="token punctuation">{</span> isShow<span class="token operator">:</span> <span class="token boolean">false</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token comment">// &#x5F15;&#x5BFC;&#x529F;&#x80FD;&#x3002; &#x76EE;&#x524D;&#x6682;&#x672A;&#x4F7F;&#x7528;</span>
            msalUserName<span class="token operator">:</span> localStorage<span class="token punctuation">.</span><span class="token function">getItem</span><span class="token punctuation">(</span>LSEnum<span class="token punctuation">.</span>officeLogin<span class="token punctuation">)</span> <span class="token comment">//office&#x767B;&#x5F55;&#x65F6;&#x7684;&#x8D26;&#x6237;</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    watch<span class="token operator">:</span> <span class="token punctuation">{</span>
        $route<span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token comment">//&#x68C0;&#x6D4B; $router &#x662F;&#x5426;&#x5B58;&#x5728;&#x91CD;&#x5B9A;&#x5411;&#x9875;&#x9762;</span>
            <span class="token function-variable function">handler</span><span class="token operator">:</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token parameter">route</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                <span class="token keyword">this</span><span class="token punctuation">.</span>redirect <span class="token operator">=</span> route<span class="token punctuation">.</span>query <span class="token operator">&amp;&amp;</span> route<span class="token punctuation">.</span>query<span class="token punctuation">.</span>redirect
            <span class="token punctuation">}</span><span class="token punctuation">,</span>
            immediate<span class="token operator">:</span> <span class="token boolean">true</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    methods<span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token function">forget</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token comment">// &#x5FD8;&#x8BB0;&#x5BC6;&#x7801; &#x6A21;&#x6001;&#x6846;&#x6253;&#x5F00;</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>$refs<span class="token punctuation">.</span>forget<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token function">showPwd</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token comment">// &#x5BC6;&#x7801;&#x8F93;&#x5165;&#x6846; &#x9690;&#x85CF;&#x3001;&#x5C55;&#x793A;</span>
            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>passwordType <span class="token operator">===</span> <span class="token string">&apos;password&apos;</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                <span class="token keyword">this</span><span class="token punctuation">.</span>passwordType <span class="token operator">=</span> <span class="token string">&apos;&apos;</span>
            <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
                <span class="token keyword">this</span><span class="token punctuation">.</span>passwordType <span class="token operator">=</span> <span class="token string">&apos;password&apos;</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token function">userLogin</span><span class="token punctuation">(</span><span class="token parameter">data</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token comment">// &#x767B;&#x5F55;&#x63A5;&#x53E3;</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>loading <span class="token operator">=</span> <span class="token boolean">true</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>$store<span class="token punctuation">.</span><span class="token function">dispatch</span><span class="token punctuation">(</span><span class="token string">&apos;userLogin&apos;</span><span class="token punctuation">,</span> data<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token parameter">user</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
                <span class="token keyword">this</span><span class="token punctuation">.</span>loading <span class="token operator">=</span> <span class="token boolean">false</span>
                <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">$notify</span><span class="token punctuation">(</span><span class="token punctuation">{</span> title<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">$t</span><span class="token punctuation">(</span><span class="token string">&apos;login.isLogin.title&apos;</span><span class="token punctuation">)</span><span class="token punctuation">,</span> message<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">$t</span><span class="token punctuation">(</span><span class="token string">&apos;login.isLogin.success&apos;</span><span class="token punctuation">)</span><span class="token punctuation">,</span> type<span class="token operator">:</span> <span class="token string">&apos;success&apos;</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
                <span class="token keyword">this</span><span class="token punctuation">.</span>$router<span class="token punctuation">.</span><span class="token function">push</span><span class="token punctuation">(</span><span class="token punctuation">{</span> path<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">.</span>redirect <span class="token operator">||</span> <span class="token string">&apos;/&apos;</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
            <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">catch</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
                <span class="token keyword">this</span><span class="token punctuation">.</span>loading <span class="token operator">=</span> <span class="token boolean">false</span>
            <span class="token punctuation">}</span><span class="token punctuation">)</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token function">handleLogin</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token comment">// &#x7528;&#x6237;&#x70B9;&#x51FB;&#x767B;&#x5F55;</span>
            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>msalUserName<span class="token punctuation">)</span> <span class="token punctuation">{</span>
                <span class="token keyword">this</span><span class="token punctuation">.</span>$message<span class="token punctuation">.</span><span class="token function">warning</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">$t</span><span class="token punctuation">(</span><span class="token string">&apos;activate.tooltip&apos;</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token keyword">return</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>$refs<span class="token punctuation">.</span>loginForm<span class="token punctuation">.</span><span class="token function">validate</span><span class="token punctuation">(</span><span class="token parameter">valid</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
                <span class="token keyword">if</span> <span class="token punctuation">(</span>valid<span class="token punctuation">)</span> <span class="token punctuation">{</span>
                    <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">userLogin</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>loginForm<span class="token punctuation">,</span> <span class="token keyword">null</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
                    console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">&apos;error submit!!&apos;</span><span class="token punctuation">)</span>
                    <span class="token keyword">return</span> <span class="token boolean">false</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span><span class="token punctuation">)</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token function">initStyle</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span> <span class="token comment">// &#x521D;&#x59CB;&#x5316; &#x4E3B;&#x9898;&#x6837;&#x5F0F;</span>
            <span class="token keyword">const</span> defaultColor <span class="token operator">=</span> localStorage<span class="token punctuation">.</span><span class="token function">getItem</span><span class="token punctuation">(</span>LSEnum<span class="token punctuation">.</span>localTheme<span class="token punctuation">)</span> <span class="token operator">||</span> <span class="token string">&apos;#3C8DBD&apos;</span><span class="token comment">//&apos;#409EFF&apos;;</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>style <span class="token operator">=</span> <span class="token punctuation">{</span>
                <span class="token string">&apos;background-color&apos;</span><span class="token operator">:</span> defaultColor<span class="token punctuation">,</span>
                <span class="token string">&apos;border-color&apos;</span><span class="token operator">:</span> defaultColor
            <span class="token punctuation">}</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>fontStyle <span class="token operator">=</span> <span class="token punctuation">{</span>
                color<span class="token operator">:</span> defaultColor
            <span class="token punctuation">}</span>
            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>msalUserName<span class="token punctuation">)</span> <span class="token keyword">this</span><span class="token punctuation">.</span>style <span class="token operator">=</span> <span class="token punctuation">{</span><span class="token punctuation">}</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token function">created</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token comment">// &#x94A9;&#x5B50; &#x9875;&#x9762;&#x52A0;&#x8F7D;&#x524D;</span>
        <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">initStyle</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<span class="token operator">&lt;</span><span class="token operator">/</span>script<span class="token operator">&gt;</span>
</code></pre>
<h5 id="officejs">office.js</h5>
<p>office&#x767B;&#x5F55;js&#x6587;&#x4EF6;</p>
<pre class="language-"><code class="lang-javascript"><span class="token keyword">import</span> Driver <span class="token keyword">from</span> <span class="token string">&apos;driver.js&apos;</span><span class="token punctuation">;</span><span class="token comment">// &#x5F15;&#x5BFC;&#x9875;&#x63D2;&#x4EF6;</span>
<span class="token keyword">import</span> <span class="token string">&apos;driver.js/dist/driver.min.css&apos;</span><span class="token punctuation">;</span><span class="token comment">// &#x5F15;&#x5BFC;&#x9875; css</span>
<span class="token keyword">import</span> <span class="token punctuation">{</span> user_office <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&apos;@/api/user&apos;</span><span class="token punctuation">;</span><span class="token comment">// &#x83B7;&#x53D6;office365&#x914D;&#x7F6E;&#x4FE1;&#x606F;</span>
<span class="token keyword">import</span> <span class="token punctuation">{</span> LocalStorageEnum <span class="token keyword">as</span> LSEnum <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&apos;@/utils/Enum/VEnum&apos;</span><span class="token punctuation">;</span><span class="token comment">// &#x679A;&#x4E3E;</span>

<span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span>
    methods<span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token function">runGuide</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token comment">// &#x5F15;&#x5BFC;&#x9875; &#x9ED8;&#x8BA4;&#x53C2;&#x6570;&#x914D;&#x7F6E;</span>
            <span class="token keyword">const</span> driver <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Driver</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
                allowClose<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
                <span class="token function-variable function">onReset</span><span class="token operator">:</span> <span class="token punctuation">(</span><span class="token parameter">Element</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
                    <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">onClose</span><span class="token punctuation">(</span>Element<span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            driver<span class="token punctuation">.</span><span class="token function">defineSteps</span><span class="token punctuation">(</span><span class="token punctuation">[</span>
                <span class="token punctuation">{</span>
                    element<span class="token operator">:</span> <span class="token string">&apos;#on&apos;</span><span class="token punctuation">,</span>
                    popover<span class="token operator">:</span> <span class="token punctuation">{</span>
                        title<span class="token operator">:</span> <span class="token string">&apos;&#x63D0;&#x793A;&apos;</span><span class="token punctuation">,</span>
                        description<span class="token operator">:</span> <span class="token string">&apos;&#x9996;&#x6B21;&#x767B;&#x5F55;&#xFF0C;&#x6D4F;&#x89C8;&#x5668;&#x53EF;&#x80FD;&#x4F1A;&#x51FA;&#x73B0;&#x963B;&#x6B62;&#x5F39;&#x7A97;&#x4E8B;&#x4EF6;&#x3002;&apos;</span><span class="token punctuation">,</span>
                        position<span class="token operator">:</span> <span class="token string">&apos;bottom&apos;</span>
                    <span class="token punctuation">}</span>
                <span class="token punctuation">}</span><span class="token punctuation">,</span>
                <span class="token punctuation">{</span>
                    element<span class="token operator">:</span> <span class="token string">&apos;#tw&apos;</span><span class="token punctuation">,</span>
                    popover<span class="token operator">:</span> <span class="token punctuation">{</span>
                        title<span class="token operator">:</span> <span class="token string">&apos;&#x63D0;&#x793A;&apos;</span><span class="token punctuation">,</span>
                        description<span class="token operator">:</span> <span class="token string">&apos;&#x6211;&#x4EEC;&#x4EE5;FireFox&#x4E3A;&#x4F8B;&apos;</span><span class="token punctuation">,</span>
                        position<span class="token operator">:</span> <span class="token string">&apos;right&apos;</span>
                    <span class="token punctuation">}</span>
                <span class="token punctuation">}</span><span class="token punctuation">,</span>
                <span class="token punctuation">{</span>
                    element<span class="token operator">:</span> <span class="token string">&apos;#th&apos;</span><span class="token punctuation">,</span>
                    popover<span class="token operator">:</span> <span class="token punctuation">{</span>
                        title<span class="token operator">:</span> <span class="token string">&apos;&#x63D0;&#x793A;&apos;</span><span class="token punctuation">,</span>
                        description<span class="token operator">:</span> <span class="token string">&apos;&#x4F7F;&#x7528;&#x524D;&#x8BF7;&#x5141;&#x8BB8;&#x5F39;&#x51FA;&#x7A97;&#x53E3;&apos;</span><span class="token punctuation">,</span>
                        position<span class="token operator">:</span> <span class="token string">&apos;bottom&apos;</span>
                    <span class="token punctuation">}</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">]</span><span class="token punctuation">)</span>
            driver<span class="token punctuation">.</span><span class="token function">start</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token function">onClose</span><span class="token punctuation">(</span><span class="token parameter">e</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token comment">// &#x5F15;&#x5BFC;&#x9875; &#x5173;&#x95ED;</span>
            localStorage<span class="token punctuation">.</span><span class="token function">setItem</span><span class="token punctuation">(</span>LSEnum<span class="token punctuation">.</span>guide<span class="token punctuation">,</span> Date<span class="token punctuation">.</span><span class="token function">now</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>guideImg<span class="token punctuation">.</span>isShow <span class="token operator">=</span> <span class="token boolean">false</span><span class="token punctuation">;</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>$router<span class="token punctuation">.</span><span class="token function">replace</span><span class="token punctuation">(</span><span class="token punctuation">{</span> path<span class="token operator">:</span> <span class="token string">&apos;/msg&apos;</span><span class="token punctuation">,</span> query<span class="token operator">:</span> <span class="token punctuation">{</span> el<span class="token operator">:</span> <span class="token string">&apos;login&apos;</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token keyword">async</span> <span class="token function">openLink</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token comment">// office&#x767B;&#x5F55; &#x6309;&#x94AE;&#x89E6;&#x53D1;</span>
            <span class="token keyword">const</span> <span class="token punctuation">{</span> data <span class="token punctuation">}</span> <span class="token operator">=</span> <span class="token keyword">await</span> <span class="token function">user_office</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">if</span><span class="token punctuation">(</span>data<span class="token punctuation">.</span>errorCode <span class="token operator">==</span> <span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
                <span class="token keyword">const</span> url <span class="token operator">=</span> data<span class="token punctuation">.</span>data<span class="token punctuation">.</span>url<span class="token punctuation">;</span>
                window<span class="token punctuation">.</span>location<span class="token punctuation">.</span>href <span class="token operator">=</span> url<span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token function">logout</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token comment">// office &#x767B;&#x51FA; &#x6309;&#x94AE;&#x89E6;&#x53D1;</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>$router<span class="token punctuation">.</span><span class="token function">replace</span><span class="token punctuation">(</span><span class="token punctuation">{</span> path<span class="token operator">:</span> <span class="token string">&apos;/msg&apos;</span><span class="token punctuation">,</span> query<span class="token operator">:</span> <span class="token punctuation">{</span> el<span class="token operator">:</span> <span class="token string">&apos;logout&apos;</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span>
</code></pre>
<h5 id="thirdparty">thirdParty</h5>
<p>office&#x767B;&#x5F55;&#x7EC4;&#x4EF6;</p>
<pre class="language-"><code class="lang-javascript"><span class="token operator">&lt;</span>script<span class="token operator">&gt;</span>
<span class="token keyword">import</span> <span class="token punctuation">{</span> mapGetters <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&apos;vuex&apos;</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token punctuation">{</span> user_office <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&apos;@/api/user&apos;</span><span class="token punctuation">;</span><span class="token comment">// &#x83B7;&#x53D6;office365&#x914D;&#x7F6E;&#x4FE1;&#x606F;</span>
<span class="token keyword">import</span> <span class="token punctuation">{</span> LocalStorageEnum <span class="token keyword">as</span> LSEnum <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&apos;@/utils/Enum/VEnum&apos;</span><span class="token punctuation">;</span><span class="token comment">// &#x679A;&#x4E3E;</span>

<span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span>
    computed<span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token operator">...</span><span class="token function">mapGetters</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token string">&apos;urlQuery&apos;</span><span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token comment">// url&#x53C2;&#x6570;</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    methods<span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token keyword">async</span> <span class="token function">logout</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token comment">// office &#x767B;&#x51FA;</span>
            <span class="token keyword">const</span> <span class="token punctuation">{</span> data <span class="token punctuation">}</span> <span class="token operator">=</span> <span class="token keyword">await</span> <span class="token function">user_office</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">if</span> <span class="token punctuation">(</span>data<span class="token punctuation">.</span>errorCode <span class="token operator">==</span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                localStorage<span class="token punctuation">.</span><span class="token function">removeItem</span><span class="token punctuation">(</span>LSEnum<span class="token punctuation">.</span>officeLogin<span class="token punctuation">)</span>
                <span class="token keyword">const</span> redirectUrl <span class="token operator">=</span> data<span class="token punctuation">.</span>data<span class="token punctuation">.</span>redirectUrl<span class="token punctuation">;</span>
                <span class="token keyword">if</span> <span class="token punctuation">(</span>redirectUrl<span class="token punctuation">)</span> <span class="token punctuation">{</span>
                    <span class="token keyword">const</span> _url <span class="token operator">=</span> <span class="token function">encodeURIComponent</span><span class="token punctuation">(</span>redirectUrl<span class="token punctuation">)</span>
                    <span class="token comment">/**
                        &#x6B64;&#x94FE;&#x63A5;&#x4E3A; office&#x5B98;&#x65B9;&#x6CE8;&#x9500;&#x94FE;&#x63A5;&#x3002;&#x91CD;&#x5B9A;&#x5411;uri&#x4E3A;&#x9879;&#x76EE;&#x4E3B;&#x9875;&#x3002;
                        &#x6CE8;&#x9500;&#x6210;&#x529F;&#x540E;&#x4F1A;&#x81EA;&#x52A8;&#x8DF3;&#x8F6C;&#x5230;uri&#x6307;&#x5411;&#x7684;&#x9875;&#x9762;
                        &#x6CE8;&#x610F;&#xFF1A;&#x6B64;uri&#x5FC5;&#x987B;&#x4E3A;&#x5916;&#x7F51;&#x53EF;&#x4EE5;&#x8BBF;&#x95EE;&#x7684;&#x5730;&#x5740;&#x3002;&#x5B9E;&#x9645;&#x516C;&#x7F51;&#x7684;&#x57DF;&#x540D;&#x3002;
                    */</span>
                    window<span class="token punctuation">.</span>location<span class="token punctuation">.</span>href <span class="token operator">=</span> <span class="token template-string"><span class="token template-punctuation string">`</span><span class="token string">https://login.microsoftonline.com/common/oauth2/v2.0/logout?post_logout_redirect_uri=</span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span>_url<span class="token interpolation-punctuation punctuation">}</span></span><span class="token template-punctuation string">`</span></span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token function">officeLogin</span><span class="token punctuation">(</span><span class="token parameter">data</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token comment">// office&#x767B;&#x5F55;</span>
            <span class="token keyword">const</span> query <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span>urlQuery<span class="token punctuation">;</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>$store<span class="token punctuation">.</span><span class="token function">dispatch</span><span class="token punctuation">(</span><span class="token string">&apos;userLogin&apos;</span><span class="token punctuation">,</span> data<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token parameter">user</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
                <span class="token keyword">const</span> <span class="token punctuation">{</span> status<span class="token punctuation">,</span> email <span class="token punctuation">}</span> <span class="token operator">=</span> user<span class="token punctuation">;</span>
                localStorage<span class="token punctuation">.</span><span class="token function">setItem</span><span class="token punctuation">(</span>LSEnum<span class="token punctuation">.</span>officeLogin<span class="token punctuation">,</span> email<span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token keyword">if</span> <span class="token punctuation">(</span>status <span class="token operator">==</span> <span class="token number">2</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                    <span class="token keyword">this</span><span class="token punctuation">.</span>$store<span class="token punctuation">.</span><span class="token function">dispatch</span><span class="token punctuation">(</span><span class="token string">&quot;setParams&quot;</span><span class="token punctuation">,</span> user<span class="token punctuation">)</span><span class="token punctuation">;</span>
                    <span class="token keyword">this</span><span class="token punctuation">.</span>$router<span class="token punctuation">.</span><span class="token function">replace</span><span class="token punctuation">(</span><span class="token punctuation">{</span> path<span class="token operator">:</span> <span class="token string">&apos;/activate&apos;</span> <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                    <span class="token keyword">return</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token keyword">if</span> <span class="token punctuation">(</span>query <span class="token operator">&amp;&amp;</span> query<span class="token punctuation">.</span>c<span class="token punctuation">)</span> <span class="token punctuation">{</span>
                    <span class="token keyword">this</span><span class="token punctuation">.</span>$router<span class="token punctuation">.</span><span class="token function">replace</span><span class="token punctuation">(</span><span class="token string">&apos;/updateuser&apos;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
                    <span class="token keyword">this</span><span class="token punctuation">.</span>$router<span class="token punctuation">.</span><span class="token function">push</span><span class="token punctuation">(</span><span class="token punctuation">{</span> path<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">.</span>redirect <span class="token operator">||</span> <span class="token string">&apos;/&apos;</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
                <span class="token punctuation">}</span>
                <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">$notify</span><span class="token punctuation">(</span><span class="token punctuation">{</span> title<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">$t</span><span class="token punctuation">(</span><span class="token string">&apos;login.isLogin.title&apos;</span><span class="token punctuation">)</span><span class="token punctuation">,</span> message<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">$t</span><span class="token punctuation">(</span><span class="token string">&apos;login.isLogin.success&apos;</span><span class="token punctuation">)</span><span class="token punctuation">,</span> type<span class="token operator">:</span> <span class="token string">&apos;success&apos;</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
            <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">catch</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token function">created</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token comment">// &#x94A9;&#x5B50;&#xFF0C;&#x9875;&#x9762;&#x52A0;&#x8F7D;&#x524D;&#xFF0C; &#x5224;&#x65AD;url&#x53C2;&#x6570;</span>
        <span class="token keyword">const</span> query <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span>$route<span class="token punctuation">.</span>query<span class="token punctuation">;</span>
        <span class="token keyword">const</span> <span class="token punctuation">{</span> state<span class="token punctuation">,</span> code<span class="token punctuation">,</span> el <span class="token punctuation">}</span> <span class="token operator">=</span> query<span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>el <span class="token operator">&amp;&amp;</span> el <span class="token operator">==</span> <span class="token string">&apos;logout&apos;</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">logout</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token keyword">if</span> <span class="token punctuation">(</span>state <span class="token operator">==</span> <span class="token string">&apos;undefined&apos;</span> <span class="token operator">||</span> code <span class="token operator">==</span> <span class="token string">&apos;undefined&apos;</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>$router<span class="token punctuation">.</span><span class="token function">replace</span><span class="token punctuation">(</span><span class="token string">&quot;/&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token keyword">if</span> <span class="token punctuation">(</span>state <span class="token operator">&amp;&amp;</span> code<span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">officeLogin</span><span class="token punctuation">(</span><span class="token punctuation">{</span> state<span class="token punctuation">,</span> code<span class="token punctuation">,</span> type<span class="token operator">:</span> <span class="token number">2</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
        <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>$router<span class="token punctuation">.</span><span class="token function">replace</span><span class="token punctuation">(</span><span class="token string">&quot;/&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
<span class="token operator">&lt;</span><span class="token operator">/</span>script<span class="token operator">&gt;</span>
</code></pre>
<h5 id="forget">forget</h5>
<p>&#x5FD8;&#x8BB0;&#x5BC6;&#x7801;&#x6A21;&#x6001;</p>
<pre class="language-"><code class="lang-javascript"><span class="token operator">&lt;</span>script<span class="token operator">&gt;</span>
<span class="token keyword">import</span> <span class="token punctuation">{</span> user_pass <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&quot;@/api/user&quot;</span><span class="token punctuation">;</span>

<span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span>
    <span class="token function">data</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">return</span> <span class="token punctuation">{</span>
            loading<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span><span class="token comment">// loading</span>
            isShow<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token comment">//&#x6A21;&#x6001;&#x6846; &#x662F;&#x5426;&#x5C55;&#x793A;</span>
            form<span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span><span class="token comment">// &#x8868;&#x5355;&#x6570;&#x636E;</span>
        <span class="token punctuation">}</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    props<span class="token operator">:</span> <span class="token punctuation">{</span>
        theme<span class="token operator">:</span> <span class="token punctuation">{</span><span class="token comment">// &#x4E3B;&#x9898;&#x6837;&#x5F0F;</span>
            type<span class="token operator">:</span> Object<span class="token punctuation">,</span>
            <span class="token keyword">default</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span> <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    methods<span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token comment">// &#x521D;&#x59CB;&#x5316;&#x51FD;&#x6570;&#xFF0C;&#x7236;&#x7EC4;&#x4EF6;&#x8C03;&#x7528;</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>form <span class="token operator">=</span> <span class="token punctuation">{</span><span class="token punctuation">}</span><span class="token punctuation">;</span>
            <span class="token function">setTimeout</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
                <span class="token keyword">this</span><span class="token punctuation">.</span>$refs<span class="token punctuation">.</span>form<span class="token punctuation">.</span><span class="token function">clearValidate</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token number">100</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>isShow <span class="token operator">=</span> <span class="token boolean">true</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token keyword">async</span> <span class="token function">submit</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token comment">// &#x8868;&#x5355;&#x63D0;&#x4EA4;&#x51FD;&#x6570;</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>loading <span class="token operator">=</span> <span class="token boolean">true</span><span class="token punctuation">;</span>
            <span class="token keyword">try</span> <span class="token punctuation">{</span>
                <span class="token keyword">let</span> <span class="token punctuation">{</span> data <span class="token punctuation">}</span> <span class="token operator">=</span> <span class="token keyword">await</span> <span class="token function">user_pass</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>form<span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token keyword">this</span><span class="token punctuation">.</span>loading <span class="token operator">=</span> <span class="token boolean">false</span><span class="token punctuation">;</span>
                <span class="token keyword">if</span> <span class="token punctuation">(</span>data<span class="token punctuation">.</span>errorCode <span class="token operator">==</span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                    <span class="token keyword">this</span><span class="token punctuation">.</span>$message<span class="token punctuation">.</span><span class="token function">success</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">$t</span><span class="token punctuation">(</span><span class="token string">&quot;login.msg.success&quot;</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                    <span class="token keyword">this</span><span class="token punctuation">.</span>isShow <span class="token operator">=</span> <span class="token boolean">false</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span> <span class="token keyword">catch</span> <span class="token punctuation">(</span>error<span class="token punctuation">)</span> <span class="token punctuation">{</span>
                <span class="token keyword">this</span><span class="token punctuation">.</span>loading <span class="token operator">=</span> <span class="token boolean">false</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token keyword">async</span> <span class="token function">validate</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token comment">// &#x8868;&#x5355;&#x6821;&#x9A8C;</span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>$refs<span class="token punctuation">.</span>form<span class="token punctuation">.</span><span class="token function">validate</span><span class="token punctuation">(</span><span class="token parameter">valid</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
                <span class="token keyword">if</span> <span class="token punctuation">(</span>valid<span class="token punctuation">)</span> <span class="token punctuation">{</span>
                    <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">submit</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
<span class="token operator">&lt;</span><span class="token operator">/</span>script<span class="token operator">&gt;</span>
</code></pre>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="layout.html" class="navigation navigation-prev " aria-label="Previous page: layout">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="myfiles.html" class="navigation navigation-next " aria-label="Next page: myfiles">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"login","level":"2.10.9","depth":2,"next":{"title":"myfiles","level":"2.10.10","depth":2,"path":"src/views/myfiles.md","ref":"src/views/myfiles.md","articles":[]},"previous":{"title":"layout","level":"2.10.8","depth":2,"path":"src/views/layout.md","ref":"src/views/layout.md","articles":[]},"dir":"ltr"},"config":{"plugins":["chapter-fold","-lunr","-search","search-pro","-highlight","prism"],"styles":{"website":"styles/website.css"},"pluginsConfig":{"prism":{"css":["prismjs/themes/prism-tomorrow.css"]},"chapter-fold":{},"search-pro":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"Gj","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"合同管理","language":"zh-hans","gitbook":"3.2.3","description":"合同管理Web端"},"file":{"path":"src/views/login.md","mtime":"2020-03-02T05:16:06.887Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-03-07T04:19:36.591Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

